# Contributor: Dhruvin Gandhi <contact@dhruvin.dev>
# Maintainer: Dhruvin Gandhi <contact@dhruvin.dev>
pkgname=reuse
pkgver=2.1.0
pkgrel=2
pkgdesc="Tool for compliance with the REUSE recommendations"
url="https://reuse.software"
arch="noarch"
license="Apache-2.0 AND CC-BY-SA-4.0 AND CC0-1.0 AND GPL-3.0-or-later"
depends="
	py3-binaryornot
	py3-boolean.py
	py3-debian
	py3-jinja2
	py3-license-expression
	"
makedepends="py3-poetry-core py3-gpep517 py3-installer"
checkdepends="py3-pytest py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/r/reuse/reuse-$pkgver.tar.gz"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/reuse*.whl
}

sha512sums="
8353ee53dd503d8dc3e956f0f13a7f0d4d80218e8b59a0bb972ecd4a80ec3b737548ad2c46177a5ba27a1c288af2c0b993befc1e0e88533af663094c3d1bcf38  reuse-2.1.0.tar.gz
"
